package viewcomponents
{
	import mx.containers.Form;
	import mx.containers.FormItem;
	import mx.containers.HBox;
	import mx.containers.Panel;
	import mx.controls.Button;
	import mx.controls.Label;
	import mx.controls.LinkButton;

	public class Logout extends Panel
	{
		private var form:Form = new Form();
		private var userFI:FormItem = new FormItem();
		private var logoutFI:FormItem = new FormItem();
		private var spaceFI:FormItem = new FormItem();
		public var user:LinkButton = new LinkButton();
		private var hbox:HBox = new HBox();
		public var logoutButton:Button = new Button();
		
		private static var isLogin:Label = new Label();
		
		public function Logout()
		{
			super();
			title = "Logout Panel";
			addChild(form);
			form.addChild(userFI);
			userFI.label = "User ";
			form.addChild(spaceFI);
			userFI.addChild(hbox);
			hbox.addChild(user);
			hbox.addChild(isLogin);
			form.addChild(logoutFI);
			isLogin.text = " is logged in!";
			logoutFI.addChild(logoutButton);
			logoutButton.label = "Logout";
		}
		
	}
}